/*
 *  ckr_spec_equality_comparisons.cpp
 *  ckrSpec
 *
 *  Created by C. Keith Ray on 2006.11.05.
 *  Copyright 2006 __MyCompanyName__. All rights reserved.
 *
 */

#import "ckr_spec_cpp_specs.h"
#import "ckr_spec_cpp.h"

#include <iostream>
#include <sstream>
#include <vector>
#include <deque>

#include <assert.h>

using namespace std;
using namespace ckr;

//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SPECIFY_(new_style_equals_int)
{
	VALUE(12).should_be == 12;
}

SPECIFY_(new_style_equals_string)
{
	CSTRING_VALUE("12").should_be == "12";
}

SPECIFY_(new_style_equals_pointer)
{
	int dozen = 12;
	int* dozenPtr = &dozen;
	int* dozenTwoPtr = dozenPtr;

	POINTER(dozenPtr).should_be == dozenTwoPtr;
}

//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SPECIFY_(new_style_not_equals_int)
{
	VALUE(12).should_be != 13;
}

SPECIFY_(new_style_not_equals_string)
{
	CSTRING_VALUE("12").should_be != "13";
	CSTRING_VALUE("12").should_be == "12";
}

SPECIFY_(new_style_not_equals_pointer)
{
	int dozen = 12;
	int* dozenPtr = &dozen;
	int* dozenTwoPtr = dozenPtr+1;

	POINTER(dozenPtr).should_be != dozenTwoPtr;
}

//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SPECIFY_(new_style_less_than_int)
{
	VALUE(12).should_be < 13;
}

SPECIFY_(new_style_less_than_string)
{
	CSTRING_VALUE("12").should_be < "13";
}

SPECIFY_(new_style_less_than_pointer)
{
	int dozen = 12;
	int* dozenPtr = &dozen;
	int* dozenTwoPtr = dozenPtr+1;

	POINTER(dozenPtr).should_be < dozenTwoPtr;
}

//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SPECIFY_(new_style_less_than_or_equal_int)
{
	VALUE(12).should_be <= 12;
	VALUE(12).should_be <= 13;
}

SPECIFY_(new_style_less_than_or_equal_string)
{
	CSTRING_VALUE("12").should_be <= "12";
	CSTRING_VALUE("12").should_be <= "13";
}

SPECIFY_(new_style_less_than_or_equal_pointer)
{
	int dozen = 12;
	int* dozenPtr = &dozen;
	int* dozenTwoPtr = dozenPtr+1;

	POINTER(dozenPtr).should_be <= dozenPtr;
	POINTER(dozenPtr).should_be <= dozenTwoPtr;
}

//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SPECIFY_(new_style_greater_than_int)
{
	VALUE(12).should_be > 11;
}

SPECIFY_(new_style_greater_than_string)
{
	CSTRING_VALUE("12").should_be > "11";
}

SPECIFY_(new_style_greater_than_pointer)
{
	int dozen = 12;
	int* dozenPtr = &dozen;
	int* dozenTwoPtr = dozenPtr+1;

	POINTER(dozenTwoPtr).should_be > dozenPtr;
}

//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SPECIFY_(new_style_greater_than_or_equal_to_int)
{
	VALUE(12).should_be >= 11;
	VALUE(12).should_be >= 12;
}

SPECIFY_(new_style_greater_than_or_equal_to_string)
{
	CSTRING_VALUE("12").should_be >= "11";
	CSTRING_VALUE("12").should_be >= "12";
}

SPECIFY_(new_style_greater_than_or_equal_to_pointer)
{
	int dozen = 12;
	int* dozenPtr = &dozen;
	int* dozenTwoPtr = dozenPtr+1;

	POINTER(dozenTwoPtr).should_be >= dozenPtr;
	POINTER(dozenTwoPtr).should_be >= dozenTwoPtr;
}

//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

